package ru.amse.tsyganov.jumleditor.view;

import java.util.List;

import org.eclipse.swt.graphics.GC;

import ru.amse.tsyganov.jumleditor.model.ActivityGraph;
import ru.amse.tsyganov.jumleditor.model.Partition;

public class ActivityGraphView<T extends ActivityGraph> extends ViewElement<T> {
	public static ActivityGraphView a; 

	/*package*/ ActivityGraphView(T model) {
		setModel(model);
		a = this;
	}

	@Override
	public void accept(Visitor v) {
		v.visitActivityGraphView(this);
		
		for (Partition p : getModel().getPartitions()) {
			PartitionView<Partition> partitionView = 
				ModelViewMap.map.getPartitionsMap().get(p);
			partitionView.accept(v);
		}
	}

	@Override
	public void paint(GC gc) {
		for (Partition p : getModel().getPartitions()) {
			PartitionView<Partition> partitionView = 
				ModelViewMap.map.getPartitionsMap().get(p);
			partitionView.paint(gc);
		}
	}

	@Override
	public List<? extends ActivePoint> getActivePoints() {
		// TODO Auto-generated method stub
		return null;
	}
}
